<template>
  <view class="server" @click="toPage(`server/detail?id=${obj.id}`)">
    <view class="server-t">{{ obj.productName }}</view>
    <view class="server-b">
      <view class="l">
        <text class="price">￥ {{ obj.price }}</text>
        <text class="line">￥ {{ obj.originalPrice }}</text>
      </view>
      <view class="r" v-if="obj.salesVolume">
        <text>销量</text>
        <text>{{ obj.salesVolume }}</text>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  props: {
    obj: {
      type: Object,
      default () {
        return {}
      }
    }
  },
  methods: {
  }
}
</script>

<style lang="scss" >
.server {

  padding: 24rpx;
  	padding-top:0 ;
  border-bottom: 1rpx solid #EEEEEE;

  &:last-child {
    border-bottom: none;

  }

  &-t {
    font-size: 28rpx;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #1A1A1A;
    line-height: 40rpx;
  }

  &-b {
    margin-top: 4rpx;
    display: flex;
    justify-content: space-between;
    font-size: 26rpx;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #999999;
    line-height: 36rpx;

    .l {
      .price {
        font-size: 36rpx;
        font-family: PingFangSC-Medium, PingFang SC;
        font-weight: 500;
        color: #FF6010;
        line-height: 50rpx;
      }

      .line {
        display: inline-block;
        margin-left: 16rpx;
        text-decoration: line-through;
      }
    }
  }
}
</style>
